import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;


public class MyRectangle extends Rectangle2D.Double {
	
	private java.awt.Color _borderColor, _fillColor;
	private int _rotation;
	private final int STROKE_WIDTH = 2;
	
	public MyRectangle(java.awt.Color aColor){
		super();
		_borderColor = aColor;
		_fillColor = aColor;
		_rotation = 0;
	}
		public void setBorderColor (java.awt.Color aColor) {
			_borderColor = aColor;
		}
		
		public void setFillColor (java.awt.Color aColor) {
			_fillColor = aColor;
		}
		
		public void setColor (java.awt.Color aColor){
			_fillColor = aColor;
			_borderColor = aColor;
		}
		
		public void setRotation (int aRotation){
			_rotation = aRotation;
		}
		
		public void setLocation(double x, double y){
			this.setFrame(x, y, this.getWidth(), this.getHeight());
		}
		
		public void setSize(int aWidth, int aHeight){
			this.setFrame(this.getX(), this.getY(), aWidth, aHeight);
		}
		
		public void move(int aChangeInX, int aChangeInY){
			this.setFrame((int)this.getX()+aChangeInX,
					(int)this.getY()+aChangeInY,
					this.getWidth(), this.getHeight());
		}
		public void fill(Graphics2D betterBrush) {
			java.awt.Color savedColor = betterBrush.getColor();
			betterBrush.setColor(_fillColor);
			betterBrush.fill(this);
			betterBrush.setColor(savedColor);
			
		}
	}
